// vim:ft=javascript

ARG_ENABLE("zephir-parser", "Whether to enable Zephir Parser", "no");
ARG_ENABLE('zephir-parser-debug', "Whether to enable debugging support in Zephir Parser", "no");

if (PHP_ZEPHIR_PARSER != "no") {
    var parser_sources = "parser\\parser.c parser\\scanner.c";
    var ext_flags = "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 " +
                    "-I" + configure_module_dirname + " " +
                    "-I" + configure_module_dirname + "\\parser ";

    if (PHP_ZEPHIR_PARSER_DEBUG != "no") {
        AC_DEFINE('USE_ZEPHIR_PARSER_DEBUG', 1, "Include debugging support in Zephir Parser");
    }

    EXTENSION("zephir_parser", "zephir_parser.c", PHP_ZEPHIR_PARSER_SHARED, ext_flags);

    PHP_INSTALL_HEADERS("ext\\zephir_parser", "zephir_parser.h");
    ADD_SOURCES(configure_module_dirname, parser_sources, "zephir_parser");

    AC_DEFINE('HAVE_ZEPHIR_PARSER', 1, "Whether you have Zephir Parser");
}
